<template>
  <view class="container">
    <!-- 顶部组件 -->
    <u-navbar
      id="nav-bar"
      :is-back="true"
      :background="{ background: 'transparent' }"
      :border-bottom="false"
      title="共享收益"
    ></u-navbar>
    <image class="bg" src="/static/images/bg.png" mode="widthFix"></image>
    <view class="content">
      <view class="header">
        <image
          class="header-bg"
          src="/static/images/icon-gxsyBg.png"
          mode="widthFix"
        ></image>
        <view class="header-in">
          <view class="main">
            <image class="avatar" src="/static/images/logo.png" mode="widthFix"></image>
            <view class="info">
              <view class="name">上海汇付数据服务股份有限公司新疆…</view>
              <view class="account"><text>1298381902381</text></view>
              <view class="progress">
                <u-line-progress height='12':show-percent='false' active-color="#B7926E" :percent="70"></u-line-progress>
              </view>
              <view class="tip">
                30天内计划(0/<text>30</text>)台或购机(0/<text>10</text>)台完成
              </view>
            </view>
            <image
              class="level"
              src="/static/images/my-level7.png"
              mode="widthFix"
            ></image>
          </view>
          <view class="dataShow">
            <view class="data">
              <view class="value">435.10</view>
              <view class="label">钱包余额</view>
            </view>
            <view class="data">
              <view class="value">已达标</view>
              <view class="label">提现情况</view>
            </view>
          </view>
        </view>
      </view>
    </view>

    <view class="mx-header">
      <view class="mx-header-in">
        <text>收益明细</text>
        <image src="/static/images/icon-tzgg.png" mode="widthFix"></image>
      </view>
      <view class="btn">规则</view>
    </view>

    <view class="list">
      <view class="item">
        <view class="main">
          <view class="title">涨价分成</view>
          <view class="time">2024-02-03 12:21:22</view>
        </view>
        <view class="num color-red">+0.4</view>
      </view>
    </view>

    <view class="bottom">
      <view class="sureBtn" @click="navigateTo('/pages/sharedBenefits/withdrawal')">提现</view>
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return {};
  },
  onLoad() {},
  methods: {
    navigateTo(url) {
      uni.navigateTo({
        url: url,
      });
    },
    changeTab(index) {},
  },
};
</script>

<style lang="scss" scoped>
.container {
  width: 100%;
  min-height: 100vh;
  padding: 30rpx;
  text-align: center;
  background-color: #f5f5f5;
  .bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
  }
}

.content {
  position: relative;
  width: 100%;

  .header {
    position: relative;
    margin-bottom: 10rpx;
    width: 100%;
    height: auto;
    .header-bg {
      width: 100%;
      height: auto;
    }
    .header-in {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      padding: 30rpx;
      background-color: transparent;
      .main {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        height: 180rpx;
        .avatar {
          width: 88rpx;
          height: 88rpx;
          border-radius: 50%;
        }
        .info {
          flex: 1;
          min-width: 0;
          padding-left: 20rpx;
          padding-right: 20rpx;
          text-align: left;
          .name {
            width: 100%;
            font-weight: bold;
            font-size: 28rpx;
            color: #ffeacc;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
          .account {
            display: flex;
            align-items: center;
            margin-top: 15rpx;
            width: 100%;
            font-weight: 400;
            font-size: 24rpx;
            color: rgba($color: #ffffff, $alpha: 0.5);
          }
          .progress {
            margin-top: 0;
            width: 100%;
            padding-right: 20rpx;
          }
          .tip {
            margin-top: 10rpx;
            width: 100%;
            padding-right: 20rpx;
            font-weight: 400;
            font-size: 22rpx;
            color: #7e7a74;
            text {
              color: #f03434;
            }
          }
        }
        .level {
          margin-right: 35rpx;
          margin-bottom: 40rpx;
          width: 87rpx;
          height: auto;
        }
      }
      .dataShow {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 130rpx;
        padding: 0 30rpx;
        .data {
          flex: 1;
          min-width: 0;
          line-height: 1;
          text-align: center;
          .value {
            width: 100%;
            font-family: DIN, sans-serif;
            font-weight: bold;
            font-size: 32rpx;
            color: #ffeacc;
          }
          .label {
            margin-top: 4rpx;
            width: 100%;
            font-weight: 400;
            font-size: 22rpx;
            color: rgba($color: #ffffff, $alpha: 0.4);
          }
        }
      }
    }
  }
}

.mx-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 30rpx 0;
  .mx-header-in {
    position: relative;
    display: inline-block;
    padding-right: 12rpx;
    text {
      position: relative;
      font-weight: 800;
      font-size: 28rpx;
      color: #333333;
      z-index: 9;
    }
    image {
      position: absolute;
      top: -10rpx;
      right: 0;
      width: 32rpx;
      height: 32rpx;
      background: #f2e3d0;
      border-radius: 50%;
      z-index: 1;
    }
  }
  .btn {
    font-weight: 400;
    font-size: 28rpx;
    color: #b7926e;
    line-height: 1;
  }
}

.list {
  width: 100%;
  overflow: hidden;
  .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30rpx;
    width: 100%;
    padding: 30rpx;
    background: #ffffff;
    border-radius: 16rpx;
    .main {
      display: flex;
      flex-direction: column;
      min-width: 0;
      line-height: 1;
      .title {
        width: 100%;
        font-weight: 800;
        font-size: 28rpx;
        color: #333333;
        text-align: left;
      }
      .time {
        margin-top: 24rpx;
        width: 100%;
        font-weight: 400;
        font-size: 24rpx;
        color: #999999;
        text-align: left;
      }
    }
    .num {
      min-width: 0;
      font-weight: 800;
      font-size: 28rpx;
    }
    .color-red {
      color: #f03434;
    }
    .color-green {
      color: #29cc7a;
    }
  }
}

.bottom {
  position: fixed;
  bottom: 60rpx;
  left: 0;
  width: 100%;
  padding: 0 30rpx;

  .sureBtn {
    width: 100%;
    height: 88rpx;
    line-height: 88rpx;
    font-size: 28rpx;
    font-weight: normal;
    color: #fff;
    text-align: center;
    background: linear-gradient(90deg, #332108, #201403);
    border-radius: 20rpx;
  }
}
</style>
